package com.slz3.business.module.goodsManagement.gooOutWarehouse.steward;

import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.module.goodsManagement.gooOutWarehouse.domain.GooOutWarehouse;
import com.slz3.business.module.goodsManagement.gooOutWarehouse.domain.GooOutWarehouseCondition;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class GooOutWarehouseResController extends GooOutWarehouseResAtomic {

    public Mono<ServerResponse> add(ServerRequest req, GooOutWarehouse gooOutWarehouse) {
        if (GooOutWarehouseResUnsafeValid.add(req, gooOutWarehouse)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.add_$GooOutWarehouseUpdateLock(req, gooOutWarehouse);
        }
    }

    public Mono<ServerResponse> delete(ServerRequest req, GooOutWarehouseCondition gooOutWarehouseCondition) {
        if (GooOutWarehouseResUnsafeValid.delete(req, gooOutWarehouseCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.delete_$GooOutWarehouseUpdateLock(req, gooOutWarehouseCondition);
        }
    }

    public Mono<ServerResponse> modify(ServerRequest req, GooOutWarehouse gooOutWarehouse) {
        if (GooOutWarehouseResUnsafeValid.modify(req, gooOutWarehouse)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.modify_$GooOutWarehouseUpdateLock(req, gooOutWarehouse);
        }
    }

    public Mono<ServerResponse> list(ServerRequest req) {
        if (GooOutWarehouseResUnsafeValid.list(req)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.list(req);
        }
    }

    public Mono<ServerResponse> info(ServerRequest req) {
//        return gooOutWarehouseResAtomic.info_$GooOutWarehouseUpdateLock(req);
        if (GooOutWarehouseResUnsafeValid.info(req)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.info_$GooOutWarehouseUpdateLock(req);
        }
    }

    public Mono<ServerResponse> choice(ServerRequest req) {
        if (GooOutWarehouseResUnsafeValid.choice(req)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.choice(req);
        }
    }

    public Mono<ServerResponse> auditSubmit(ServerRequest req, GooOutWarehouseCondition gooOutWarehouseCondition) {
        //
        if (GooOutWarehouseResUnsafeValid.auditSubmit(req, gooOutWarehouseCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.auditSubmit_$GooOutWarehouseUpdateLock(req, gooOutWarehouseCondition);
        }
    }

    public Mono<ServerResponse> audit(ServerRequest req, GooOutWarehouseCondition gooOutWarehouseCondition) {
        if (GooOutWarehouseResUnsafeValid.audit(req, gooOutWarehouseCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.audit_$GooOutWarehouseUpdateLock(req, gooOutWarehouseCondition);
        }
    }

    public Mono<ServerResponse> auditReject(ServerRequest req, GooOutWarehouseCondition gooOutWarehouseCondition) {
        if (GooOutWarehouseResUnsafeValid.auditReject(req, gooOutWarehouseCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.auditReject_$GooOutWarehouseUpdateLock(req, gooOutWarehouseCondition);
        }
    }

    public Mono<ServerResponse> usingEnable(ServerRequest req, GooOutWarehouseCondition gooOutWarehouseCondition) {
        if (GooOutWarehouseResUnsafeValid.usingEnable(req, gooOutWarehouseCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.usingEnable_$GooOutWarehouseUpdateLock(req, gooOutWarehouseCondition);
        }
    }

    public Mono<ServerResponse> usingDisable(ServerRequest req, GooOutWarehouseCondition gooOutWarehouseCondition) {
        if (GooOutWarehouseResUnsafeValid.usingDisable(req, gooOutWarehouseCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.usingDisable_$GooOutWarehouseUpdateLock(req, gooOutWarehouseCondition);
        }
    }

}
